<?php

namespace ApiBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Article
 *
 * @ORM\Table(name="article", options={"comment":"文章表"})
 * @ORM\Entity
 */
class Article
{
    /**
     * @var string
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\Admin")
     * @ORM\JoinColumn(name="admin_id", referencedColumnName="id", nullable=true)
     */
    private $admin;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\District")
     * @ORM\JoinColumn(name="district_id", referencedColumnName="id", nullable=true)
     */
    private $district;

    /**
     * @ORM\OneToOne(targetEntity="ApiBundle\Entity\Training")
     * @ORM\JoinColumn(name="training_id", referencedColumnName="id", nullable=true)
     */
    private $training;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\Attachment")
     * @ORM\JoinColumn(name="attachment_id", referencedColumnName="id", nullable=true)
     */
    private $attachment;

    /**
     * @var string
     *
     * @ORM\Column(name="title", type="string", length=255, options={"comment":"标题"})
     */
    private $title;

    /**
     * @var string
     *
     * @ORM\Column(name="summary", type="string", length=255, options={"default":"", "comment":"概述"})
     */
    private $summary;

    /**
     * @var string
     *
     * @ORM\Column(name="content", type="text", options={"default":"", "comment":"内容"})
     */
    private $content;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", options={"comment":"创建时间"})
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"更新时间"})
     */
    private $updatedAt;

    /**
     * @var string
     *
     * @ORM\Column(name="count_unread", type="integer", options={"default":0, "comment":"未读数目人数"})
     */
    private $countUnread;

    /**
     * @var string
     *
     * @ORM\Column(name="count_isread", type="integer", options={"default":0, "comment":"已读数目人数"})
     */
    private $countRead;

    /**
     * @var string
     *
     * @ORM\Column(name="count_unapply", type="integer", options={"default":0, "comment":"未报名人数"})
     */
    private $countUnapply;

    /**
     * @var string
     *
     * @ORM\Column(name="count_isapply", type="integer", options={"default":0, "comment":"已报名人数"})
     */
    private $countIsapply;
}
